from typing import List


class Solution:
    def getMaximumConsecutive(self, coins: List[int]) -> int:
        m = 0
        coins.sort()
        for c in coins:
            if c > m+1:
                break
            else:
                m +=c
        return m+1


if __name__ == '__main__':
    coins = [1,3]
    solution = Solution()
    val = solution.getMaximumConsecutive(coins)
    print(val)